home *** CD-ROM | disk | FTP | other *** search
- @echo off
- if {%1}=={} @echo syntax: Historique donnΘe&goto :EOF
- setlocal
- regedit /a "%TEMP%\DelTypedURL.TM1" "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\TypedURLs"
- If exist "%TEMP%\DelTypedURL.VBS" goto doit
- @echo.dim fso, readfile, contents, writefile, objArguments, w1, w2, w3, w4, w5, w6, w7, w8 >"%TEMP%\DelTypedURL.VBS"
- @echo.dim FullFileName, NewFilename>>"%TEMP%\DelTypedURL.VBS"
- @echo.Set objArguments = Wscript.Arguments>>"%TEMP%\DelTypedURL.VBS"
- @echo.ps1 = 2 >>"%TEMP%\DelTypedURL.VBS"
- @echo.ps2 = 7 >>"%TEMP%\DelTypedURL.VBS"
- @echo.ps3 = 1 >>"%TEMP%\DelTypedURL.VBS"
- @echo.ps4 = 6 >>"%TEMP%\DelTypedURL.VBS"
- @echo.ps5 = 8 >>"%TEMP%\DelTypedURL.VBS"
- @echo.ln = 3 >>"%TEMP%\DelTypedURL.VBS"
- @echo.cnt=0 >>"%TEMP%\DelTypedURL.VBS"
- @echo.set fso = CreateObject("Scripting.FileSystemObject")>>"%TEMP%\DelTypedURL.VBS"
- @echo.FullFileName="%TEMP%\DelTypedURL.TM1">>"%TEMP%\DelTypedURL.VBS"
- @echo.NewFilename="%TEMP%\DelTypedURL.TM2">>"%TEMP%\DelTypedURL.VBS"
- @echo.set readfile = fso.OpenTextFile(FullFileName, 1, false)>>"%TEMP%\DelTypedURL.VBS"
- @echo.set writefile = fso.CreateTextFile(NewFileName, 2)>>"%TEMP%\DelTypedURL.VBS"
- @echo.Do until readfile.AtEndOfStream = True>>"%TEMP%\DelTypedURL.VBS"
- @echo.contents = readfile.ReadLine>>"%TEMP%\DelTypedURL.VBS"
- @echo.if MID(contents, ps3, ps3) = "[" Then>>"%TEMP%\DelTypedURL.VBS"
- @echo.w3 = Len(contents) - 1 >>"%TEMP%\DelTypedURL.VBS"
- @echo.w4 = MID(contents, ps1, w3)>>"%TEMP%\DelTypedURL.VBS"
- @echo.writefile.writeLine "[-" ^& w4>>"%TEMP%\DelTypedURL.VBS"
- @echo.end if>>"%TEMP%\DelTypedURL.VBS"
- @echo.w1 = Replace(contents, objArguments(0), "#")>>"%TEMP%\DelTypedURL.VBS"
- @echo.if w1 = contents Then>>"%TEMP%\DelTypedURL.VBS"
- @echo.w2 = MID(contents, ps1, ln) >>"%TEMP%\DelTypedURL.VBS"
- @echo.if w2 ^<^> "url" Then>>"%TEMP%\DelTypedURL.VBS"
- @echo.writefile.writeLine contents>>"%TEMP%\DelTypedURL.VBS"
- @echo.else>>"%TEMP%\DelTypedURL.VBS"
- @echo.w6 = MID(contents, ps3, ps2)>>"%TEMP%\DelTypedURL.VBS"
- @echo.w7 = len(contents) - 7 >>"%TEMP%\DelTypedURL.VBS"
- @echo.w8 = MID(contents, ps5, w7) >>"%TEMP%\DelTypedURL.VBS"
- @echo.if MID(w8, ps3, ps3) ^<^> "=" Then >>"%TEMP%\DelTypedURL.VBS"
- @echo.w8 = "=" ^& w8 >>"%TEMP%\DelTypedURL.VBS"
- @echo.end if>>"%TEMP%\DelTypedURL.VBS"
- @echo.cnt = cnt + 1 >>"%TEMP%\DelTypedURL.VBS"
- @echo.contents = """url" ^& cnt ^& """" ^& w8 >>"%TEMP%\DelTypedURL.VBS"
- @echo.writefile.writeLine contents>>"%TEMP%\DelTypedURL.VBS"
- @echo.end if>>"%TEMP%\DelTypedURL.VBS"
- @echo.else>>"%TEMP%\DelTypedURL.VBS"
- @echo.Wscript.Echo "SupprimΘ " ^& contents >>"%TEMP%\DelTypedURL.VBS"
- @echo.end if>>"%TEMP%\DelTypedURL.VBS"
- @echo.loop>>"%TEMP%\DelTypedURL.VBS"
- @echo.readfile.close>>"%TEMP%\DelTypedURL.VBS"
- @echo.writefile.close>>"%TEMP%\DelTypedURL.VBS"
- :doit
- cscript //nologo "%TEMP%\DelTypedURL.VBS" %1
- regedit /s "%TEMP%\DelTypedURL.TM2"
- del /q "%TEMP%\DelTypedURL.TM1"
- del /q "%TEMP%\DelTypedURL.TM2"
- endlocal
-